* lisp/cus-edit.el (custom-save-all): Do the custom saves as an
atomic change group, to avoid writing invalid data if something
goes wrong (or the user hits `C-g') in the middle (bug#18633).
(let ((inhibit-read-only t)
(print-length nil)
(print-level nil))
- (custom-save-variables)
- (custom-save-faces))
+ (atomic-change-group
+ (custom-save-variables)
+ (custom-save-faces)))
(let ((file-precious-flag t))
(save-buffer))
(if old-buffer